<template>
  <div>
    <el-tabs v-model="tableName" class="demo-tabs" @tab-click="handleClick">
      <el-tab-pane v-for="(item, index) in tableList" :key="index" :label="item.label" :name="item.name">
        <component :is="item.component"></component>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup lang='ts'>
import { reactive, ref, shallowRef } from 'vue';
import spray from './components/spray.vue'
import car from './components/car.vue'
import robot from './components/robot.vue'

let tableName = ref("0")
let tableList = shallowRef([
  {label:'喷淋系统', name:'0', component:spray},
  {label:'珩车', name:'1', component:car},
  {label:'机器人', name:'2', component:robot},
])

const handleClick = () => {}
</script>

<style lang='scss' scoped>

</style>
